<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>
			蘑菇街后台管理
		</title>
		<link href="app/Admin/View/Index/css/bootstrap.min.css" rel="stylesheet">
		<link href="app/Admin/View/Index/font-awesome/css/font-awesome.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/plugins/iCheck/custom.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/animate.css" rel="stylesheet">
		<link href="app/Admin/View/Index/css/style.css" rel="stylesheet">
			<style type="text/css">
				body{background: #F3F3F4;}
				.page-heading{margin-top: 20px;}
				.breadcrumb{margin-top: 20px;margin-bottom: 20px;background: #F3F3F4;}
				.i-checks{padding-right: 10px}
				.zhuyi{color: #F8AC59;font-size: 16px;}
			</style>
	</head>
	<body>
		<div class="row">
			<div class="col-lg-10" >
				<ol class="breadcrumb">
					<li>
						<a>
							商品管理
						</a>
					</li>
					<li>
						<a>
							栏目管理
						</a>
					</li>
					<li class="active">
						<strong>修改栏目</strong>
					</li>
				</ol>
			</div>
		</div>
		<div class="animated fadeInRight">
			<div class="row">
				<div class="col-lg-10">
					<div class="ibox float-e-margins">
						<div class="ibox-title">
							<div class="ibox-tools">
								<a class="collapse-link">
									<i class="fa fa-chevron-up">
									</i>
								</a>
								<a class="dropdown-toggle" data-toggle="dropdown" href="#">
									<i class="fa fa-wrench">
									</i>
								</a>
								<a class="close-link">
									<i class="fa fa-times">
									</i>
								</a>
							</div>
						</div>
						<div class="ibox-content">
                            <form method="post" class="form-horizontal">
                            	<input type="hidden" name="cat_id" id="cat_id" value="{{$file['cat_id']}}" />
                                <div class="form-group"><label class="col-sm-2 control-label">父级栏目</label>
                                    <div class="col-sm-4">
                                    	<select class="form-control m-b" name="pid">
	                                        <option value="0">顶级栏目</option>
	                                        <?php foreach ($cat as $k => $v):?>
	                                        <option value="{{$v['cat_id']}}"
	                                        	<?php if($file['pid']==$v['cat_id']){?> selected <?php }?>
	                                        	<?php if($file['cat_id']==$v['cat_id']){?> disabled <?php }?>	
	                                        	<?php if(Data::isChild($cat,$v['cat_id'],$file['cat_id'],'cat_id')){?> disabled <?php }?>
	                                        >{{$v['_name']}}</option>
	                                       <?php endforeach ?>
                                    	</select>
                                    	</div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group"><label class="col-sm-2 control-label">栏目名称</label>
                                    <div class="col-sm-4"><input type="text" name="cat_name" value="{{$file['cat_name']}}" class="form-control"></div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group"><label class="col-sm-2 control-label">栏目关键词</label>
                                    <div class="col-sm-4"><input type="text" name="keyword" value="{{$file['keyword']}}" class="form-control"></div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group"><label class="col-sm-2 control-label">栏目描述</label>
                                    <div class="col-sm-4"><textarea name="dest" class="form-control"  style="height: 100px;resize: none;">{{$file['dest']}}</textarea></div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-2">
                                        <button class="btn btn-primary">提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
					</div>
				</div>
			</div>
		</div>
		<!-- Mainly scripts -->
		<script src="app/Admin/View/Index/js/jquery-2.1.1.js"></script>
		<script src="app/Admin/View/Index/js/bootstrap.min.js"></script>
		<script src="app/Admin/View/Index/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="app/Admin/View/Index/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<!-- Peity -->
		<script src="app/Admin/View/Index/js/plugins/peity/jquery.peity.min.js"></script>
		<script src="Public/org/hdjs/hdjs.min.js"></script>
		<!-- Custom and plugin javascript -->
		<script src="app/Admin/View/Index/js/inspinia.js"></script>
		<script src="app/Admin/View/Index/js/plugins/pace/pace.min.js"></script>
		<!-- iCheck -->
		<script src="app/Admin/View/Index/js/plugins/iCheck/icheck.min.js"></script>
		<!-- Peity -->
		<script src="app/Admin/View/Index/js/demo/peity-demo.js"></script>
		 <script src="js/plugins/iCheck/icheck.min.js"></script>
        <script>
            $(document).ready(function () {
                $('.i-checks').iCheck({
                    checkboxClass: 'icheckbox_square-green',
                    radioClass: 'iradio_square-green',
                });
            });
        </script>
	</body>
</html>
